Upgrade Next.js to 15, React to 19#410
Conversation
- next: ^14 → ^15 (frontpage, addon-catalog, ui) - react/react-dom: ^18 → ^19 (all workspace packages) - framer-motion: ^11 → ^12 (fix AnimationControls type, 'pop'→'spring', RefObject null) - next-plausible: ^3 → ^4 (add src param, simplify PlausibleProvider) - @storybook/nextjs: ^8.1.1 → ^8.6 - Await async params in releases, recipes, docs slug pages (Next.js 15 breaking change) - Await headers() in versions route and docs footer actions (Next.js 15 breaking change) - Extract getLlmsBannerLines to lib/ (Next.js 15 disallows non-route exports from route files) - Remove JSX.Element return types (@types/react@19 removed global JSX namespace) - Add legacy-peer-deps=true to .npmrc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for storybook-addon-catalog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for storybook-frontpage ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Upgrades the monorepo’s web stack to Next.js 15 and React 19 and applies the required breaking-change fixes across apps and shared packages (routing params/headers async changes, React 19 typing strictness, framer-motion v12 changes, and next-plausible v4 updates).
Changes:
- Bump Next.js to
^15and React/ReactDOM + React types to^19across workspaces. - Fix Next 15 breaking changes (async
params,await headers(), route-file export restrictions) and refactor LLM banner helpers intolib/. - Update framer-motion and analytics integration code to match new APIs/types.
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/package.json | Updates React + React type dependencies for workspace compatibility. |
| packages/ui/src/footer/top-section.tsx | Removes JSX.Element return annotation for React 19 typings. |
| packages/ui/src/dropdown-menu/index.tsx | Removes JSX.Element return annotation for React 19 typings. |
| packages/ui/package.json | Upgrades Next/React/types + next-plausible to match the new stack. |
| package.json | Adds root-level React/ReactDOM versions for the workspace. |
| apps/frontpage/package.json | Upgrades Next/React, framer-motion, next-plausible, Storybook Next integration. |
| apps/frontpage/next.config.js | Updates next-plausible proxy configuration for v4. |
| apps/frontpage/next-env.d.ts | Adds typed-routes reference for Next-generated route types. |
| apps/frontpage/lib/get-llms-banner-lines.ts | Extracts LLM banner helper from route file (Next 15 constraint). |
| apps/frontpage/components/home/share/player.tsx | Updates framer-motion transition type (pop → spring). |
| apps/frontpage/components/home/develop/demo/controls.tsx | Updates framer-motion control typing approach for v12. |
| apps/frontpage/components/home/automate/ui-tests/ui-tests.tsx | Adjusts ref typings for React 19 stricter nullability. |
| apps/frontpage/components/docs/footer/actions.ts | Awaits headers() per Next 15 async request APIs. |
| apps/frontpage/app/versions/route.ts | Awaits headers() per Next 15 async request APIs. |
| apps/frontpage/app/releases/iframe/[slug]/page.tsx | Updates route params handling to async/await pattern. |
| apps/frontpage/app/releases/[slug]/page.tsx | Updates route params handling to async/await pattern. |
| apps/frontpage/app/recipes/[...name]/page.tsx | Updates route params handling to async/await pattern and call sites. |
| apps/frontpage/app/providers.tsx | Updates Plausible provider usage for next-plausible v4 API. |
| apps/frontpage/app/llms.txt/route.ts | Removes non-route export and imports extracted helper from lib/. |
| apps/frontpage/app/llms-full.txt/route.ts | Updates import to use extracted LLM banner helper. |
| apps/frontpage/app/layout.tsx | Removes JSX.Element return annotation for React 19 typings. |
| apps/frontpage/app/docs/[...slug]/page.tsx | Updates route params handling to async/await pattern. |
| apps/addon-catalog/package.json | Upgrades Next/React, framer-motion, next-plausible, React types. |
| apps/addon-catalog/app/providers.tsx | Updates Plausible provider usage for next-plausible v4 API. |
| .npmrc | Enables legacy-peer-deps to bypass peer dependency conflicts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@storybook/addon-essentials": "^8.1.1", | ||
| "@storybook/addon-interactions": "^8.1.1", | ||
| "@storybook/addon-links": "^8.1.1", | ||
| "@storybook/blocks": "^8.1.1", | ||
| "@storybook/nextjs": "^8.1.1", | ||
| "@storybook/nextjs": "^8.6", | ||
| "@storybook/preview-api": "^8.1.1", |
There was a problem hiding this comment.
@storybook/nextjs is bumped to ^8.6, but the other Storybook packages in this app (including storybook itself) remain on ^8.1.1. This version skew commonly triggers peer-dependency conflicts and can lead to hard-to-debug runtime issues; align the Storybook package versions within this workspace to the same minor/patch line.
| "graphql-request": "^7.1.0", | ||
| "human-format": "^1.2.0", | ||
| "next": "^14.2.4", | ||
| "next-plausible": "^3.12.0", | ||
| "next": "^15", | ||
| "next-plausible": "^4.0.0", | ||
| "next-themes": "^0.3.0", |
There was a problem hiding this comment.
This workspace upgrades next to ^15, but @next/third-parties remains at ^14.2.4 (see the top of the dependencies list). Please align @next/third-parties to ^15 to match the Next.js major version and reduce risk of incompatibilities.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Updated @next/third-parties from ^14.2.4 to ^15 in apps/addon-catalog/package.json to align with the Next.js major version (commit 8a531f3).
| "@types/react": "^19", | ||
| "@types/react-dom": "^19", | ||
| "eslint": "^8", | ||
| "eslint-config-next": "14.2.4", |
There was a problem hiding this comment.
eslint-config-next is still pinned to 14.2.4 while next is ^15. This can cause lint rule/config mismatches for Next 15 projects; update eslint-config-next (and related Next lint tooling if used) to the matching ^15 major.
| "eslint-config-next": "14.2.4", | |
| "eslint-config-next": "^15", |
| @@ -0,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
Setting legacy-peer-deps=true changes install semantics globally and can mask real peer-dependency incompatibilities (especially during CI), leading to non-deterministic runtime behavior. Prefer resolving the underlying peer conflicts (e.g., aligning Storybook/Next-related versions) and only use this as a last resort (or document/scoped usage if it must remain).
| legacy-peer-deps=true |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rehype-pretty-code requires shiki as a peer dep, and graphql-request requires graphql. Next.js 15's bundler is stricter about resolving peer deps that aren't explicitly installed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Important UI Tests need review – Review now🟡 UI Tests: web/frontpage: 3 changes must be accepted as baselines |
|
Tip All tests passed and all changes approved!🟢 UI Tests: web/ui: 11 tests unchanged |
…t-plausible v4) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Next.js 15 expects @next/eslint-plugin-next@>=12.3.0 <15.0.0-0 as an optional peer dep. Bumping to ^15 meant it was never installed, which Next.js promotes to a fatal error when CI=true. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Was missing from the lockfile so npm ci in CI never installed it, causing Next.js to fail with a fatal peer dep error when CI=true. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent-Logs-Url: https://github.com/storybookjs/web/sessions/b82ec22c-2db0-49ca-9604-a5d1c7f43cbb Co-authored-by: shilman <488689+shilman@users.noreply.github.com>
Summary
^14→^15(frontpage, addon-catalog, ui)^18→^19(all workspace packages)^11→^12^3→^4^8.1.1→^8.6Breaking change fixes
paramsinreleases/[slug],releases/iframe/[slug],recipes/[...name],docs/[...slug]pagesheaders()inversionsroute anddocs/footer/actions.tsgetLlmsBannerLinestolib/(Next.js 15 disallows non-route exports from route files)JSX.Elementreturn type annotations (@types/react@19removed global JSX namespace)AnimationControls→ReturnType<typeof useAnimation>(framer-motion v12)transition type: 'pop'→'spring'(removed in framer-motion v12)RefObject<HTMLDivElement>→RefObject<HTMLDivElement | null>(React 19 strictness)PlausibleProviderprops (next-plausible v4 API change)legacy-peer-deps=trueto.npmrcTest plan
npx tsc --noEmitpasses with 0 errorsnpx turbo run build --filter=frontpagepasses (4/4 tasks successful)/,/releases/9.1,/recipes/@angular/material,/docs/get-started/why-storybook— all return 200🤖 Generated with Claude Code